/**
 * 
 */
package com.mobile2you.nci.android;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView;

import com.mobile2you.nci.android.domain.Centres;
import com.mobile2you.nci.android.utils.ListCentreAdapter;
import com.mobile2you.nci.android.utils.Utils;

/**
 * @author JBromo
 * 
 */
public class MenuExpressDetails extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		this.setContentView(R.layout.menu_express_detail);
		ListView listView = (ListView) findViewById(R.id.list_centre);
		final ListCentreAdapter adapter = new ListCentreAdapter(
				MenuExpress.listCentres, true);
		listView.setAdapter(adapter);
		listView.setOnItemClickListener(new OnItemClickListener() {
			@Override
			public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,
					long arg3) {
				final Centres centre = (Centres) adapter.getItem(arg2);
				Utils.centreSelected = centre;
				Utils.lancerActiviter(MenuExpressDetails.this,
						MenuCentreDetail.class);
			}
		});

	}

}
